home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DEMO_VGA
/
UTILVGA1.LZH
/
VPT.MAN
< prev
next >
Wrap
Text File
|
1988-01-23
|
12KB
|
274 lines
┌───────────────────────────────────────────┐
│ VIDEO GRAPHICS ARRAY - PALETTE TOOL V3.01 │
└───────────────────────────────────────────┘
(C) Copyright 1988 by clySmic software. All rights reserved.
I. INTRODUCTION
This program allows VGA (PS/2 Model 50, 60 or 80) or Display
Adapter/2 or 100% compatible VGA clone owners to:
■ View the quarter-million color palette they've been hearing
about,
■ Set any attribute (0 - 15) to any color,
■ Have the colors "stick" with most programs,
■ Load and save their favorite settings in palette files, and
■ Use the program in a command-line mode.
II. FILES INCLUDED
■ VPT.EXE................The VGA Palette Tool.
■ VPT.MAN................This documentation.
■ LOCK.COM...............A small TSR that locks EGA and VGA
palette registers (optional).
■ TSTPATN.EXE............A television test pattern to judge
colors with.
III. INTERACTIVE MODE
Command: VPT
VPT operates in text mode and allows setting of any or all of the
sixteen attributes available in text mode. There are three
sliders (one each for Red, Green, and Blue), each of which can
assume any of 64 values (0 through 63). The current values are
displayed next to the sliders on the right side of the screen.
Key(s) Action
----------------- ----------------------------------------
Left/Right Arrows Moves the R,G, or B slider between 0 and
63 to control the intensity of the R, G,
or B signal.
Control Left/Right As above, but moves five positions
instead of one.
PageUp/PageDown Selects an attribute between 0 and 15 to
work with.
B Backdrop mode. This makes the current
attribute the background and places text
with all sixteen attributes on the
screen so you can see the combinations.
Any key exits this mode.
D Loads the default, boot-up colors.
L Loads the colors from a file of your
choice, if no file is specified, STD.VPT
is assumed. You don't need to add the
.VPT extension.
S Saves the colors to a file of your
choice, if no file is specified, STD.VPT
is assumed. Note: all .VPT files are
saved to the directory VPT is found in,
NOT the current directory (unless
VPT.EXE is there!)
O Sets the overscan (border) color to the
current attribute. NO guarantees are
made about the "stickyness" of this
setting.
End Exits VPT.
Keys Used While Loading or Saving a File:
Backspace Erases the last character in the file
name.
Ctrl-Backspace Erases all the characters in the file
name.
IV. COMMAND-LINE MODE
Command: VPT [option]
Where [option] is one of the following (capitalization does not
matter):
/L[filename] This loads the specified file, if there
is one. If there isn't, you will get an
error message. If [filename] is not
specified, STD.VPT will be assumed.
/C[filename] Like /L above, but does an ANSI clear
screen afterwards and displays no
messages.
/D This loads the default palette. These
are the colors assigned by IBM and are
the ones you would see if you didn't use
VPT.
/X This resets the "palette load on mode
change" option to true (see TECHNICAL
INFORMATION, below, for an explanation).
/? Presents a help list recapping your
options.
Any other option will generate an error message.
The main reason for command-line mode is to include VPT in batch
files. First you would run VPT interactively, find the colors
you like, save them in the STD.VPT file, then include a line like
the following:
VPT /L
in your batch file. This will load your saved colors when you
run the batch file. VPT.EXE should be placed in a directory on
your PATH. If you don't wish to see the informational messages
produced by VPT in command-line mode, you can redirect the output
to the null device (a.k.a. the bit bucket) as follows:
VPT /L >NUL:
Note that error messages *cannot* be redirected and will still be
seen.
V. MORE EXAMPLES
VPT /L123PAL Loads the palette file 123PAL.VPT. This
assumes you created such a file using
the interactive mode of VPT.
VPT /C Loads STD.VPT and clears the screen.
VPT /? Brings forth help.
VI. TECHNICAL INFORMATION
■ GENERAL
VPT works by making BIOS calls that manipulate the DAC (digital
to analog converter) color registers; each register (there are
256, to allow for the 300x200x256 mode) contains 18 bits, 6 each
for Red, Green, and Blue. Each RGB value can go from 0 to 63,
all the combinations makes for 262,144 possible colors. You can
show up to sixteen of these at a time in the text modes, each of
the sixteen "attributes" can be any color (or all the same color)
out of the quarter-million.
■ MODE SETS
Normally BIOS resets the EGA and DAC color registers whenever a
mode set is done. VPT makes its colors stick across a mode
change by using the "Default Palette Loading During Mode Set"
BIOS call to disable this action. If, for some reason, you
desire to return this to its default, boot-up condition, use VPT
/X. Then a subsequent mode change, like MODE CO80, will cause
the default conditions to prevail.
■ REGISTERS, REGISTERS EVERYWHERE
The DAC color registers are mapped through the EGA palette
registers, so, for instance, the attribute "Brown" (6) maps to
the color $14 on an EGA (out of its 64 possible colors); on the
VGA, DAC color register $14 contains $2A,$15,$00 for the R, G,
and B values (these are all default values).
In order to not to be foiled by EGA-aware programs, VPT resets
the EGA palette registers to their default values each time it is
run. If a program remaps the EGA registers, and then counts on a
mode set to return them to normal when it exits, the registers
will *stay* remapped because of the disabling of the "palette
load on mode set". Simply type VPT /C (for instance) and it will
remap the EGA registers to their default values.
Note that EGA-aware programs will still use their own colors
while the program is running, VPT doesn't prevent that.
■ PALETTE FILES
The saved palette files have an extension of .VPT which you NEVER
need to type when using VPT.
For DOS 3.x users, they are stored in the same directory that VPT
is run from. For instance, say VPT is stored in the C:\BIN
directory, that directory is on your PATH, and you are in
C:\ZUUL. The palette file will be stored in C:\BIN. For DOS 2.x
users, the file will be stored in the root directory. DOS 1.x
users are quite out of luck, why do one have advanced video but
DOS 1.x anyway?
VPT attempts to check for a valid palette file by not loading any
files that aren't exactly 49 bytes long. You will get a 'bad
.VPT file' message. If a file is 49 bytes long and has a .VPT
extension but *isn't* a VPT palette file, it will get loaded
anyway. The colors should be interesting.
■ REFERENCES
VPT was written based on technical information from IBM's Display
Adapter/2 Technical Reference. There is very little discussion
of some aspects of the VGA, but all the BIOS calls are there
(even if they're not explained well). If anyone has any other
sources of tech info (especially about the MCGA) please let me
know.
VII. CAVEATS
I don't believe VPT will run correctly on the MCGA in the Models
25 and 30. I only have Model 50s and 60s to test it on, but
since part of the program relies on mapping through the EGA
palette registers (which the MCGA doesn't have), I don't see how
it could work. I also am not sure if the VGA detection routine
in VPT would think the MCGA is a valid VGA or not. EGA-aware and
VGA-aware programs still will run with their own colors, all
(okay, almost all, who knows what's out there?) other programs
will use the colors VPT sets.
If you want to "lock" the colors you set against any programs
that try to change them using BIOS, set your colors, then run the
TSR program LOCK.COM included in this package. This program can
be removed and re-run by using a TSR control package like
TurboPower's excellent MARK and RELEASE (available on CompuServe
and probably everywhere else).
VPT uses only BIOS calls and should run on the *real* VGA clones
that are now just becoming available; however, the pseudo-VGAs
(really EGAs with 640x480 mode) won't run it - they still have
only 64 colors total (and will cause grief down the road for
their buyers, I suspect). Any test results are welcomed.
VIII. ENHANCEMENTS
I would like to add MCGA support in a future release. I am also
working on a TSR that would load the EGA registers with the
default values upon a mode change. This would prevent the
situation when you are using an EGA aware program that exit by
doing a mode change and assumes that will reset the EGA. With
VPT loaded it won't and one has to type something like VPT /C
afterwards to clean up the colors. All suggestions are welcome.
IX. ALL THAT LEGAL BROUHAHA
The program is copyrighted by clySmic software, but may be copied
and posted on BBS systems, as long as it is not altered, it is
credited to clySmic, and all files are kept together.
-- Ralph Smith,
clySmic software
CIS 76156,164